package com.framework.Listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class ApplicationListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        // todo  应用启动时
        ServletContext servletContext = servletContextEvent.getServletContext();
        String serverInfo = servletContext.getServerInfo();
        String contextPath = servletContext.getContextPath();
        String virtualServerName = servletContext.getVirtualServerName();
        String servletContextName = servletContext.getServletContextName();
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {

    }
}
